Page({
  data: {
  
    mid:"", // 当前用户的mid
  
    tabIndex: 2,
    tabLine: ["视频分析", "粉丝画像", "舆情分析"],
  },

  // 拿到参数
  onLoad({ mid }) {
    this.setData({
      mid,
    })
    // console.log(query);
  },

  // 获取UP主详情
  initLineChart() {
    const dom = this.selectComponent("#CoreDataLine");
    dom.loadEchart(
      ["10-25", "10-26", "10-27", "10-28", "10-28", "10-30", "10-31"],
      [18, 36, 65, 30, 7124548, 40, 33],
      "粉丝"
    );
  },
  // 点击总量 和 差量
  totalHandler({ target }: any) {
    this.setData({
      index: target.dataset.index * 1,
    });
  },
  // 点击粉丝选项卡
  onTabChange({ detail }: any) {
    this.setData({
      active: detail.index,
    });
  },
  // 点击组件切换选项卡
  onTabLineChange({ detail }: any) {
    console.log(detail);
    this.setData({
      tabIndex: detail.index,
    });
  },
});
